Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mzufferey 4 posts 24 karma points
    Aug 05, 2010 @ 07:43
    mzufferey
    0

    $currentPage/data[@alias = concat('ALIASNAME',$flang)]

    Hi,

    I'm using the version 4.5 of umbraco and I'm following the documentation below to create a multilingual website :

    http://umbraco.org/documentation/books/multilingual-11-sites

    I followed all the steps but the text using xslt (Chapter 5) doesn't render.

    I tried to do the same with the version 4.0 and everything work fine.

    Could you please provider me some help ! Thanks

  • Kim Andersen 1447 posts 2196 karma points MVP
    Aug 05, 2010 @ 08:53
    Kim Andersen
    0

    Hi there mzufferey

    In version 4.5 of Umbraco, the XML schema has been changed, so that's probably why the above code doesn't work for you.

    Maybe this will work:

    $currentPage/concat('ALIASNAME',$flang)

    I haven't tested it, but in the new schema there are no more need of this part:

    data[@alias='']

    You can try printing out the $currentPage to see the XML that you are working with like this:

    <textarea>
    <xsl:copy-of select="$currentPage"/>
    </textarea>

    A good idea is to copy the returned XML into Visual Studio, Notepad++, Dreamweaver etc. to get a better view of the content.

    If you prefer to work with the old XML schema you can turn it on in the umbracoSettings.config-file. Find this line:

    <UseLegacyXmlSchema>false</UseLegacyXmlSchema>

    And change it to true. Then your XML should be just as you are used to from v4.0

    /Kim A

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Aug 05, 2010 @ 09:07
    Chriztian Steinmeier
    1

    Hi mzufferey (+Kim),

    The line you're referencing should be rephrased like this to work with the new schema:

    $currentPage/*[name() = concat('ALIASNAME', $flang)]

    /Chriztian

  • mzufferey 4 posts 24 karma points
    Aug 05, 2010 @ 10:52
    mzufferey
    0

    Hi,

    I tried both solution and the one of Chriztian work fine.

    Kim, I didn't try all of your solutions but it's good to know what it's possible do.

    Thanks for your support.

Please Sign in or register to post replies

Write your reply to:

Draft